package com.heima.feign.config;


import com.heima.feign.client.TaskScheduleFeignClient;
import feign.Logger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * 配置降级工厂类
 */
@Configuration
public class DefaultFeignConfiguration {

    @Bean
    public Logger.Level feignLogLevel(){
        return Logger.Level.BASIC; // 日志级别为BASIC
    }

    @Bean
    public ArticleClientFallbackFactory articleClientFallbackFactory(){

        return new ArticleClientFallbackFactory();
    }

    @Bean
    public TaskScheduleFeignClientFallbackFactory taskScheduleFeignClient(){
        return new TaskScheduleFeignClientFallbackFactory();
    }

    @Bean
    public WmUserFeignClientFallbackFactory wmUserFeignClientFallbackFactory(){
        return new WmUserFeignClientFallbackFactory();
    }

    @Bean
    public ApUserFallBackFactory apUserFallBackFactory(){
        return new ApUserFallBackFactory();
    }



}
